<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    .wrapper {
      overflow: hidden;
    }

    ul {
      overflow: hidden;
      transition: all 0.5s ease;
      border: 1px;
    }

    li {
      transition: all 2s ease;
    }

    span:hover ~ .wrapper ul li {
      color: red;
      margin-top: -100%;
    }
  </style>
</head>
<body>
<span>hover</span>
<div class="wrapper">
  <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
  </ul>
</div>
<hr>
</body>
</html>
